import 'package:flutter/material.dart';
import 'package:flutter_learn/home/DrawerPage.dart';
import 'package:flutter_learn/home/Bottom_Navigation_Bar.dart';
import 'package:flutter_learn/home/Page_One.dart';
import 'PageView_demo.dart';
import 'package:flutter_learn/home/GridViewBuilderDemo.dart';

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return DefaultTabController(
      length: 4,
      child: Scaffold(
          appBar: AppBar(
              elevation: 0.0,
              title: Text(
                "Flutter Learn",
                style: TextStyle(fontSize: 20.0),
              ),
              actions: <Widget>[
                IconButton(
                    icon: Icon(Icons.search),
                    onPressed: () {
                      print("search");
                    })
              ],
              bottom: TabBar(
                unselectedLabelColor: Colors.black38,
                tabs: [
                  Tab(
                    icon: Icon(Icons.local_florist),
                  ),
                  Tab(
                    icon: Icon(Icons.ac_unit),
                  ),
                  Tab(
                    icon: Icon(Icons.directions_bike),
                  ),
                  Tab(
                    icon: Icon(Icons.favorite),
                  )
                ],
                indicatorSize: TabBarIndicatorSize.label,
                indicatorColor: Colors.black26,
              )),
          body: TabBarView(children: [
            Page_One(),
            Icon(
              Icons.ac_unit,
              size: 128.0,
              color: Colors.black12,
            ),
            GridViewBuilderPage(),
            PageViewDemo()
          ]),
          drawer: DrawerPage(),
          bottomNavigationBar: BottomNavigationBarPage()),
    );
  }
}
